// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 上传资源 POST /api/Teach/addResource */
export async function addResourceUsingPost(
  body: API.TeachingRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/Teach/addResource", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 教师发帖 POST /api/Teach/addTeachingPost */
export async function addTeachingPostUsingPost(
  body: API.TeachingPostRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject_>("/api/Teach/addTeachingPost", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询全部资源 POST /api/Teach/all */
export async function updateAchievementArticleUsingPost3(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseListTeachingResourceAndImg_>(
    "/api/Teach/all",
    {
      method: "POST",
      ...(options || {}),
    }
  );
}

/** 删除教师发帖 POST /api/Teach/deleteTeachingPost */
export async function deleteEducationAchievementUsingPost1(
  body: API.QueryTeachingRequest[],
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject_>("/api/Teach/deleteTeachingPost", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询所有教师发帖（支持公共/个人、关键词、排序、分页、文章Id） POST /api/Teach/getTeachingPost */
export async function getTeachingPostUsingPost(
  body: API.QueryTeachingRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject_>("/api/Teach/getTeachingPost", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据资源名称查询教学资源 GET /api/Teach/searchByResourceName */
export async function searchByResourceNameUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.searchByResourceNameUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListTeachingResource_>(
    "/api/Teach/searchByResourceName",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 更改（标题，内容，图片） POST /api/Teach/updateTeachingPost */
export async function updateAchievementArticleUsingPost2(
  body: API.TeachingPostRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseObject_>("/api/Teach/updateTeachingPost", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
